/*
 * RSInt.h
 *
 *  Created on: 2010/03/17
 *      Author: alexandre
 */

#ifndef RSINT_H_
#define RSINT_H_

#include "RSValueElement.h"

namespace Realsphere {

    class RSInt : public Realsphere::RSValueElement {
        Q_OBJECT
        public:
            RSInt ( );
            RSInt ( const QString& rScopeId );
            RSInt ( const int& rValue );
            RSInt ( const QString& rScopeId, int& rValue );

            RSValueType                     ValueType () const;
            RSDataSize                      SizeOf () const;
            RSDataPointer                   DataPointer();
            QString                         ToString () const;

            int                             Value () const;

        public slots:
            void                            SetValue ( const int& rValue, bool rEmit = true );
            void                            SetValue ( const RSInt& rValue, bool rEmit = true );

        public:
            RSInt&                          operator=( const int& rValue );
            RSInt&                          operator=( const RSInt& rValue );

        private:
            int                             mValue;
    };

}

#endif /* RSINT_H_ */
